/**
 * 
 */
package com.gmail.sabujdas.patterns.singleton;

/**
 * @author Sabuj Das | sabuj.das@gmail.com
 *
 */
public final class ThreadSafeLazySingleton {

	private static volatile ThreadSafeLazySingleton instance;
	
	private ThreadSafeLazySingleton(){}

	/**
	 * @return the instance
	 */
	public static ThreadSafeLazySingleton getInstance() {
		if(instance == null){
			synchronized (ThreadSafeLazySingleton.class) {
				if(instance == null)
					instance = new ThreadSafeLazySingleton();
			}
		}
		
		return instance;
	}
	
	
}
